<template>
  <div>
    <!-- 外层容器 -->
    <el-container>
      <!-- 上半区域：顶栏 -->
      <el-header class="layout-header">
        <!-- 顶栏的标题文字 -->
        <h1>达内技术社区后台管理平台</h1>
      </el-header>
      <!-- 下半区域 -->
      <el-container class="layout-body">
        <!-- 下半区域的左侧边栏 -->
        <el-aside class="layout-aside">
          <el-menu
              router
              :default-active="$router.currentRoute.path"
              class="el-menu-vertical-demo"
              background-color="#222"
              text-color="#fff"
              active-text-color="#fff">
            <!-- 主页 -->
            <el-menu-item index="/admin/index">
              <i class="el-icon-s-home"></i>
              <span>主页</span>
            </el-menu-item>
            <!-- 文章管理 -->
            <el-submenu index="temp">
              <template slot="title">
                <i class="el-icon-warning"></i>
                <span>文章管理</span>
              </template>
              <el-menu-item index="/admin/temp/tag/type/add-new">
                <i class="el-icon-circle-plus"></i>
                <span slot="title">新增标签类别</span>
              </el-menu-item>
              <el-menu-item index="/admin/temp/tag/type/list">
                <i class="el-icon-circle-plus"></i>
                <span slot="title">标签类别列表</span>
              </el-menu-item>
              <el-menu-item index="/admin/temp/tag/add-new">
                <i class="el-icon-circle-plus"></i>
                <span slot="title">新增标签</span>
              </el-menu-item>
              <el-menu-item index="/admin/temp/tag/list">
                <i class="el-icon-circle-plus"></i>
                <span slot="title">标签列表</span>
              </el-menu-item>
            </el-submenu>
            <!-- 标签 -->
            <el-submenu index="temp1">
              <template slot="title">
                <i class="el-icon-warning"></i>
                <span>标签管理</span>
              </template>
              <el-menu-item index="/admin/temp/tag/type/add-new">
                <i class="el-icon-circle-plus"></i>
                <span slot="title">新增标签类别</span>
              </el-menu-item>
              <el-menu-item index="/admin/temp/tag/type/list">
                <i class="el-icon-circle-plus"></i>
                <span slot="title">标签类别列表</span>
              </el-menu-item>
              <el-menu-item index="/admin/temp/tag/add-new">
                <i class="el-icon-circle-plus"></i>
                <span slot="title">新增标签</span>
              </el-menu-item>
              <el-menu-item index="/admin/temp/tag/list">
                <i class="el-icon-circle-plus"></i>
                <span slot="title">标签列表</span>
              </el-menu-item>
            </el-submenu>
          </el-menu>
        </el-aside>
        <!-- 下半区域的右侧主体 -->
        <el-main class="layout-main">
          <!-- 由其它视图组件来显示 -->
          <router-view/>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
export default {
  name: "AdminHomeView"
}
</script>
<style>
.layout-header {
background: #1684b0;
}

.layout-header h1 {
color: #fff;
line-height: 60px;
}
el-aside layout-aside{
  width: 20px;
}
.layout-body {
position: absolute;
top: 60px;
bottom: 0;
left: 0;
right: 0;
}

.layout-aside {
background: #222;
  width: 10px;
}

.layout-aside .el-menu {
border: 0;
}

.layout-aside i {
color: #fff !important;
}

.layout-main {
background: #fff;
}

.el-menu-item.is-active {
background: #2d3c4d !important;
}
</style>
